#pragma once
#include "mygamewindow.h"
#include "Sprite.h"
#include "string"
using namespace std;

enum GameButton_State
{
	GBS_Normal = 0,
	GBS_MouseOn,
	GBS_MouseDown,
	GBS_MouseUp,
	GBS_Disabale
};

class CMyGameButton :public CMyGameWindow
{
protected:
	GameButton_State m_bsState;
	CSprite m_SprButtonBmp;
	void* m_pUserData;
	
public:
	CMyGameButton(void);
	~CMyGameButton(void);	

	void LoadBmpFromFile(LPCSTR szFileName);
	void Update();
	BOOL LBtnDown(int x,int y);
	BOOL LBtnUp(int x,int y);
	BOOL MouseMove(int x,int y);
	void Draw(HDC hDC);
	virtual void OnClick();
	void EnableButton(BOOL bEnable);
	void SetUserData(void* pUserData);
	void* GetUserData();
};
